package com.ruoyi.member.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.member.mapper.FamilyMemberImageMapMapper;
import com.ruoyi.member.domain.FamilyMemberImageMap;
import com.ruoyi.member.service.IFamilyMemberImageMapService;

/**
 * 家庭成员与图像映射Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-31
 */
@Service
public class FamilyMemberImageMapServiceImpl implements IFamilyMemberImageMapService 
{
    @Autowired
    private FamilyMemberImageMapMapper familyMemberImageMapMapper;

    /**
     * 查询家庭成员与图像映射
     * 
     * @param id 家庭成员与图像映射主键
     * @return 家庭成员与图像映射
     */
    @Override
    public FamilyMemberImageMap selectFamilyMemberImageMapById(Long id)
    {
        return familyMemberImageMapMapper.selectFamilyMemberImageMapById(id);
    }

    /**
     * 查询家庭成员与图像映射列表
     * 
     * @param familyMemberImageMap 家庭成员与图像映射
     * @return 家庭成员与图像映射
     */
    @Override
    public List<FamilyMemberImageMap> selectFamilyMemberImageMapList(FamilyMemberImageMap familyMemberImageMap)
    {
        return familyMemberImageMapMapper.selectFamilyMemberImageMapList(familyMemberImageMap);
    }

    /**
     * 新增家庭成员与图像映射
     * 
     * @param familyMemberImageMap 家庭成员与图像映射
     * @return 结果
     */
    @Override
    public int insertFamilyMemberImageMap(FamilyMemberImageMap familyMemberImageMap)
    {
        familyMemberImageMap.setCreateTime(DateUtils.getNowDate());
        return familyMemberImageMapMapper.insertFamilyMemberImageMap(familyMemberImageMap);
    }

    /**
     * 修改家庭成员与图像映射
     * 
     * @param familyMemberImageMap 家庭成员与图像映射
     * @return 结果
     */
    @Override
    public int updateFamilyMemberImageMap(FamilyMemberImageMap familyMemberImageMap)
    {
        familyMemberImageMap.setUpdateTime(DateUtils.getNowDate());
        return familyMemberImageMapMapper.updateFamilyMemberImageMap(familyMemberImageMap);
    }

    /**
     * 批量删除家庭成员与图像映射
     * 
     * @param ids 需要删除的家庭成员与图像映射主键
     * @return 结果
     */
    @Override
    public int deleteFamilyMemberImageMapByIds(Long[] ids)
    {
        return familyMemberImageMapMapper.deleteFamilyMemberImageMapByIds(ids);
    }

    /**
     * 删除家庭成员与图像映射信息
     * 
     * @param id 家庭成员与图像映射主键
     * @return 结果
     */
    @Override
    public int deleteFamilyMemberImageMapById(Long id)
    {
        return familyMemberImageMapMapper.deleteFamilyMemberImageMapById(id);
    }
}
